//package com.mycompany.rocketmq.producer;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import com.alibaba.rocketmq.client.producer.SendCallback;
//import com.alibaba.rocketmq.client.producer.SendResult;
//import com.alibaba.rocketmq.common.message.Message;
//
//@Component
//public class producerSupport {
//	@Autowired
//	private  Myproducer myproducer;
//
//	public  void sendMsg(String Topic,String tag,String key,byte[] value){
//		try {
//			Message msg = new Message(Topic,/*topic*/
//					tag,/*tag*/
//					key,/*key*/
//					value/*body*/
//			);
//			myproducer.getDefaultMQProducer().send(msg, new SendCallback() {
//				public void onSuccess(SendResult sendResult) {
//					System.out.println("send message success. topic=" + sendResult.getQueueOffset() + ", msgId=" + sendResult.getMsgId());
//				}
//
//				public void onException(Throwable arg0) {
//				}
//			});
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}
//
//}
